/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View;

import java.awt.Point;
import java.awt.geom.Rectangle2D;

import Model.Vertex;

/**
 *
 * @author pol
 */
public class VertexView extends Rectangle2D.Float {

    public VertexView(Vertex v, int x, int y, int w, int h) {
        super(x, y, w, h);
        vertex = v;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public Point getLocation() {
        return new Point(
                (int) super.getMinX(), (int) super.getMinY());
    }

    public void setLocation(Point location) {
        super.setFrame(
                location.getX(), location.getY(), getWidth(), getHeight());
    }
    private boolean selected;
    private Vertex vertex;
}
